package behavior.Command;

/**
 * Created by LYJ on 2016/10/20.
 */
public class Client2 {
    public void run(){
        AudioPlayer audioPlayer = new AudioPlayer();
        Command playCommand = new PlayCommand(audioPlayer);
        Command rewindCommand = new RewindCommand(audioPlayer);
        Command stopCommand = new StopCommand(audioPlayer);

        MacroCommand marco = new MacroAudioCommand();
        marco.addCommand(playCommand);
        marco.addCommand(rewindCommand);
        marco.addCommand(stopCommand);
        marco.execute();
    }
}
